import request from '@/utils/request';

// 托盘码列表
export function palletCodeList(query) {
    return request({
        url: '/system/productPalletCodeBindingRelationship/list',
        method: 'get',
        params: query
    })
}

// 生产计划列表
export function udiPlanList(query) {
    return request({
        url: '/system/productPlan/palletCodePlan',
        method: 'get',
        params: query
    })
}

// 托盘码详细信息
export function palletCodeDetail(id) {
    return request({
        url: '/system/productPalletCodeBindingRelationship/selectOne?id=' + id,
        method: 'get'
    })
}

// 新建托盘码绑定
export function palletCodeAdd(data) {
    return request({
        url: '/system/productPalletCodeBindingRelationship/insert',
        method: 'post',
        data: data
    })
}

// 编辑托盘码绑定
export function palletCodeUpdate(data) {
    return request({
        url: '/system/productPalletCodeBindingRelationship/update',
        method: 'post',
        data: data
    })
}

// 删除产品计划
export function palletCodeDelete(id) {
    return request({
        url: '/system/productPalletCodeBindingRelationship/deleteById?id=' + id,
        method: 'get'
    })
}

// 确认绑定
export function palletCodeConfirm(data) {
    return request({
        url: '/system/productPalletCodeBindingRelationship/deterMine',
        method: 'post',
        data: data
    })
}